package com.niiwoo.civet.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 标的表-channel_code
 * Created by bincun on 2017/11/30.
 */
@Getter
@AllArgsConstructor
public enum ChannelCodeEnum {

    APP("app",(byte)0,"你我金融"),
    KAOLA("kaolalicai",(byte)1,"考拉理财"),
    TUANDAI("tuandai",(byte)2,"团贷网"),
    XINSHOUZHINENGTOU("xinshouzhinengtou",(byte)3,"新手智能投"),
    ZHINENGTOU("intelligent_investment",(byte)4,"智能投"),
    XINSHOUBIAO("20181030",(byte)5,"新手标");

    private String chanelCode;//入DB库
    private Byte financeFlag;//前端
    private String desc;

    public static ChannelCodeEnum enumOf(String chanelCode) {
        for (ChannelCodeEnum channelCode : values()) {
            if (channelCode.getChanelCode().equals(chanelCode.toLowerCase())) {
                return channelCode;
            }
        }
        return null;
    }
}
